export const config = (opt) => {
  return [
    {
      type: 'input',
      prop: 'name',
      label: '名称',
      colOpts: {
        span: 8
      }
    },
    {
      type: 'input',
      prop: 'bdz',
      label: '变电站',
      slotName: 'suffix',
      slotRender: ({ column }) => {
        return (
          <div>
            <span onclick={() => opt.handleClick(column)}>选择</span>
            <span onclick={() => opt.handleClick(column)}>清除</span>
          </div>
        );
      },
      colOpts: {
        span: 8
      }
    },
    {
      type: 'input',
      prop: 'name2',
      label: '名称',
      colOpts: {
        span: 8
      }
    },
    {
      type: 'input',
      prop: 'name2',
      label: '名称2',
      slotName: 'append',
      slotRender: 'AppendBtn',
      appendBtnClick: (attrs) => {
        // 点击按钮事件
        console.log(attrs.label);
        console.log(attrs.prop);
      },
      colOpts: {
        span: 24
      }
    },
    {
      type: 'select',
      prop: 'xz',
      label: '名称2',
      colOpts: {
        span: 24
      },
      options: [
        {
          label: '是',
          value: '1'
        },
        {
          label: '否',
          value: '0'
        }
      ],
      change: (value) => {
        console.log(value, 'value');
      }
    }
  ];
};
